package api

import (
	"github.com/gin-gonic/gin"
	"vtrip/pkg/app"
)

type Scenery struct{}

func NewScenery() Scenery {
	return Scenery{}
}

// All
// @Summary TODO 获取所有景点信息
// @Produce json
// @Param token header string true "Token"
// @Param page body number false "页码"
// @Param page_size body number false "页大小"
// @Router /scenery/all [post]
// @Success 200 {object} nil "成功"
// @Failure 400 {object} errcode.Error "请求错误"
// @Failure 500 {object} errcode.Error "内部错误"
func (s Scenery) All(c *gin.Context) {}

// Get
// @Summary TODO 获取某个景点的详细信息（可临时测试）
// @Produce json
// @Param token header string true "Token"
// @Param scenery_id body number true "景点 id"
// @Router /scenery/get [post]
// @Success 200 {object} nil "成功"
// @Failure 400 {object} errcode.Error "请求错误"
// @Failure 500 {object} errcode.Error "内部错误"
func (s Scenery) Get(c *gin.Context) {
	response := app.NewResponse(c)
	response.ToSuccessResponse(gin.H{
		"id":        1,
		"name":      "滕王阁",
		"title":     "落霞与孤鹜齐飞，秋水共长天一色",
		"summary":   "有着六千年历史的古镇充满中国水墨画的气息，石巷、老屋、雕梁随处可见，住进这些酒店，感受小桥流水人家的韵味。",
		"cover_url": "https://bkimg.cdn.bcebos.com/pic/562c11dfa9ec8a136327c60f9a4d868fa0ec09fa6a87",
		"image_url_list": [...]string{"https://bkimg.cdn.bcebos.com/pic/562c11dfa9ec8a136327c60f9a4d868fa0ec09fa6a87",
			"https://bkimg.cdn.bcebos.com/pic/562c11dfa9ec8a136327c60f9a4d868fa0ec09fa6a87",
			"https://bkimg.cdn.bcebos.com/pic/562c11dfa9ec8a136327c60f9a4d868fa0ec09fa6a87"},
		"video_url_list": [...]string{"https://vd3.bdstatic.com/mda-kjfay6bifv1zmzrq/mda-kjfay6bifv1zmzrq.mp4",
			"https://vd3.bdstatic.com/mda-kjfay6bifv1zmzrq/mda-kjfay6bifv1zmzrq.mp4",
			"https://vd3.bdstatic.com/mda-kjfay6bifv1zmzrq/mda-kjfay6bifv1zmzrq.mp4"},
		"hotel": gin.H{
			"price": 180,
			"location": gin.H{
				"name":        "某酒店",
				"address":     "酒店地址",
				"description": "酒店描述",
				"latitude":    30.734411,
				"longitude":   120.494293,
			},
		},
		"routes": [...]gin.H{
			{
				"name":        "A",
				"address":     "A 地址",
				"description": "A 描述",
				"latitude":    30.734411,
				"longitude":   120.494293,
			},
			{
				"name":        "B",
				"address":     "B 地址",
				"description": "B 描述",
				"latitude":    30.734411,
				"longitude":   120.494293,
			},
		},
	})
}

// Create
// @Summary TODO 创建一条景点信息
// @Produce json
// @Param token header string true "Token"
// @Param name body string true "景点名称"
// @Param cover_url body string false "封面地址"
// @Param introduce body string true "景点简介"
// @Router /scenery/publish [post]
// @Success 200 {object} nil "成功"
// @Failure 400 {object} errcode.Error "请求错误"
// @Failure 500 {object} errcode.Error "内部错误"
func (s Scenery) Create(c *gin.Context) {}
